export function setRSApass(data) {
    let jes = new JSEncrypt();
    let publicKey = `
    -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs3fGeVEqU9ugHvVpz+aX
v8LSIKcrGE36rfdsbyTVDcQv1GuySbnOm1VzkFyAsJqdHuEhEaHgryN/EX4+v0WY
tZ1koo6xfGLfcH4Iqa5gVqXAy2+cuhW3x4R95GNdeQIBOriebgtjVLMxppWHoY+A
G6rFNHoJxoYwIOHqvu2FlLEJDHYMlwJaD7PowXEzc3LODsLIsCThkMIPREwh0U/y
6fOL6ezageqU02Sz+BoNa575vdAQfcTVEvYGMGK0Y5m4dP2C5iMoO4rOcFxZHl9d
rAzxNuAEPyhTnNneH9pJQgROBjO9kKFSo+UaaU/xWZ5SM7upmR2SkbKtNA0YguLw
YwIDAQAB
-----END PUBLIC KEY-----
`;
    jes.setPublicKey(publicKey);
    return jes.encrypt(data);
}

export function getRSApass(data) {
    let jes = new JSEncrypt();
    let privateKey = `-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAs3fGeVEqU9ugHvVpz+aXv8LSIKcrGE36rfdsbyTVDcQv1Guy
SbnOm1VzkFyAsJqdHuEhEaHgryN/EX4+v0WYtZ1koo6xfGLfcH4Iqa5gVqXAy2+c
uhW3x4R95GNdeQIBOriebgtjVLMxppWHoY+AG6rFNHoJxoYwIOHqvu2FlLEJDHYM
lwJaD7PowXEzc3LODsLIsCThkMIPREwh0U/y6fOL6ezageqU02Sz+BoNa575vdAQ
fcTVEvYGMGK0Y5m4dP2C5iMoO4rOcFxZHl9drAzxNuAEPyhTnNneH9pJQgROBjO9
kKFSo+UaaU/xWZ5SM7upmR2SkbKtNA0YguLwYwIDAQABAoIBAH5OkdTYFt4l+C9R
sUKsm6hOSOzKOj5Ew2SkeiBO39Nse+0YTsYsiwgvv8GeGMQyTNpqv4dVUnhwlwGM
xESBitRnDWiK3McaHv9g9F/XZd4VkfabesZMeqdky+VtOV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